package org.bambrikii.kbManager.kb2.managers.query4;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public abstract class In<T> extends ConditionBase<T> {

	private List<ICondition<T>> conditions;

	public In(ConditionType type, final ICondition<T> condition) {
		super(type);
		setConditions(new ArrayList<ICondition<T>>() {
			private static final long serialVersionUID = 5099365672616163925L;
			{
				add(condition);
			}
		});
	}

	public In(ConditionType type, ICondition<T>... conditions) {
		super(type);
		setConditions(new ArrayList<ICondition<T>>(Arrays.asList(conditions)));
	}

	public List<ICondition<T>> getConditions() {
		return conditions;
	}

	public void setConditions(List<ICondition<T>> conditions) {
		this.conditions = conditions;
	}

	public abstract T buildCriteria();

}
